import request from '@/utils/request'

// 检查订单号是否重复
export function checkOrderIdExists(oId) {
  return request({
    url: '/orders/shouhou/checkOrderId',
    method: 'get',
    params: { oId }
  })
}

// 查询售后管理列表
export function listShouhou(query) {
  return request({
    url: '/orders/shouhou/list',
    method: 'get',
    params: query
  })
}
export function listOrder() {
  return request({
    url: '/orders/order/list',
    method: 'get'
  })
}
// 查询售后管理详细
export function getShouhou(id) {
  return request({
    url: '/orders/shouhou/' + id,
    method: 'get'
  })
}

// 新增售后管理
export function addShouhou(data) {
  return request({
    url: '/orders/shouhou',
    method: 'post',
    data: data
  })
}

// 修改售后管理
export function updateShouhou(data) {
  return request({
    url: '/orders/shouhou',
    method: 'put',
    data: data
  })
}

// 删除售后管理
export function delShouhou(id) {
  return request({
    url: '/orders/shouhou/' + id,
    method: 'delete'
  })
}
